<?php //pack11class

class ObjectsListNavigationItem extends Module {

    public function setup() {

        $setting=SettingsManager::getSetting("navigation");
        $naviSetting=clone $setting;
        $naviSetting->value=$this->param;
        $queryObject=new GetQueryObject();
        $queryObject=GetQuery::useDefinedVars();
        $queryObject->setValue($naviSetting, GetQueryObject::SETTING);
        $query=GetQuery::generate($queryObject);
        //trace(GetQuery::$qline);
        $link="?state=".$query;
        if(array_key_exists("search",$_GET)) $this->events=str_replace('\"', '"', "onClick=\"PostData.release('".$query."&search');\"");
            else $this->events=str_replace('\"', '"', "onClick=\"location.href='".$link."';\"");

        $this->setBody($this->param);
        if($this->param==ObjectsListNavigation::getPageNumber()) {
            $this->setClass("ObjectsListNavigationItemCurrent");
        }
    }

}
?>
